<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<pre>
    const obj = new Proxy({}, {
        get: function (target, propKey, receiver) {
            console.log(`getting ${propKey}!`);
            return Reflect.get(target, propKey, receiver);
        },
        set: function (target, propKey, value, receiver) {
            console.log(`setting ${propKey}!`);
            return Reflect.set(target, propKey, value, receiver);
        }
    });
</pre>

<script>
    const obj = new Proxy({name: 'hello world'}, {
        get(target, propKey) {
            return target[propKey]
        },
        set(target, propKey, value) {
            target[propKey] = value
        }
    })
</script>

</body>
</html>
